<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>Template Units For Numerical Applications</title>
<link href="TUNAstyles.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
<style type="text/css">

.cabeza_cell {
  border-left: 1px solid #000000;
  border-right: 1px solid #000000;
  border-bottom: 1px solid #000000;
  border-top: 1px solid #000000;
  font-family: Arial,Helvetica,sans-serif;
  font-size: 11pt;
  background-color: #ffffff;
  font-weight: lighter;
  color: #000000;
  text-decoration: none;
}
</style>

</head><body>
<div>
<table align="center" width="640" border="0" cellspacing="2" cellpadding="5" class="border">
<tr>
 <td class="cabeza_cell"> 

  <font style="font-family: helvetica; color: #000000;" size=4>
    <font style="font-family: helvetica; color: #336699; font-weight=bold" size=5>TUNA</font> :
    <font style="font-family: helvetica; color: #336699; font-weight=bold" size=5>T</font>emplate
    <font style="font-family: helvetica; color: #336699; font-weight=bold" size=5>U</font>nits for
    <font style="font-family: helvetica; color: #336699; font-weight=bold" size=5>N</font>umerical 
    <font style="font-family: helvetica; color: #336699; font-weight=bold" size=5>A</font>pplications
 </font><br>
  
</td>
</tr>

<tr>
<td class="cabeza_cell">
 <span style="font-family: helvetica; color: #336699;">
 Documentation Ver 1.0.0 August 2011 by
 <a href="http://mmc.geofisica.unam.mx/luiggi">Luis M. de la Cruz</a> <br>
 <a href="http://mmc.geofisica.unam.mx"> GMMC </a> -
 <a href="http://www.geofisica.unam.mx/recnat/"> Depto. de Recursos Naturales </a> -
 <a href="http://www.geofisica.unam.mx"> Instituto de Geof&iacute;sica </a> -
 <a href="http://www.unam.mx"> UNAM </a><br>
 </span>
 </td>

</tr>

</table>
</div>
<br>
<!-- Generated by Doxygen 1.7.1 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search');
--></script>
<div class="navigation" id="top">
  <div class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li id="searchli">
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
      <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
    </ul>
  </div>
  <div class="navpath">
    <ul>
      <li><b>Tuna</b>      </li>
      <li><a class="el" href="classTuna_1_1Mesh.html">Tuna::Mesh&lt; Tmesh &gt;</a>      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-attribs">Protected Attributes</a>  </div>
  <div class="headertitle">
<h1>Tuna::Mesh&lt; Tmesh &gt; Class Template Reference</h1>  </div>
</div>
<div class="contents">
<!-- doxytag: class="Tuna::Mesh" -->
<p>General class for meshes.  
<a href="#_details">More...</a></p>

<p><a href="classTuna_1_1Mesh-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">typedef Typeinfo&lt; Tmesh &gt;::<a class="el" href="classTuna_1_1Mesh.html#a79c0813866ecb690735d8d9b3bf8f89c">prec_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTuna_1_1Mesh.html#a79c0813866ecb690735d8d9b3bf8f89c">prec_t</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Precision used for the numerical operations.  <a href="#a79c0813866ecb690735d8d9b3bf8f89c"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af86367aa40f3dcc88dd3638c2e038751"></a><!-- doxytag: member="Tuna::Mesh::ScalarField1D" ref="af86367aa40f3dcc88dd3638c2e038751" args="" -->
typedef <a class="el" href="structTuna_1_1TunaArray.html">TunaArray</a>&lt; <a class="el" href="classTuna_1_1Mesh.html#a79c0813866ecb690735d8d9b3bf8f89c">prec_t</a>, 1 &gt;<br class="typebreak"/>
::huge&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTuna_1_1Mesh.html#af86367aa40f3dcc88dd3638c2e038751">ScalarField1D</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Arrays for numbers. <br/></td></tr>
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a66f3853bfedf35ecc89f597cab6745d8"></a><!-- doxytag: member="Tuna::Mesh::asDerived" ref="a66f3853bfedf35ecc89f597cab6745d8" args="()" -->
Tmesh &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTuna_1_1Mesh.html#a66f3853bfedf35ecc89f597cab6745d8">asDerived</a> ()</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This funtion gets an returns a reference to the derived class, using the Curiously Recursive Template Pattern (CRTP). <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a47a5560e7bb6dcb2f13ffcc48f042072"></a><!-- doxytag: member="Tuna::Mesh::calcPoints" ref="a47a5560e7bb6dcb2f13ffcc48f042072" args="()" -->
bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTuna_1_1Mesh.html#a47a5560e7bb6dcb2f13ffcc48f042072">calcPoints</a> ()</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Delegate responsabilities to derived classes. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aefd043c52415901b9cf6bf5f231028fa"></a><!-- doxytag: member="Tuna::Mesh::calcElements" ref="aefd043c52415901b9cf6bf5f231028fa" args="()" -->
bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTuna_1_1Mesh.html#aefd043c52415901b9cf6bf5f231028fa">calcElements</a> ()</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Delegate responsabilities to derived classes. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classTuna_1_1Mesh.html#af86367aa40f3dcc88dd3638c2e038751">ScalarField1D</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTuna_1_1Mesh.html#a102cde9073e547876b39a1c6f012cf30">getCoord</a> (Axis_t a)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns a std::vector&lt;prec_t&gt; with the coordinates distribution in the axis defined by the parameter <code>a</code>.  <a href="#a102cde9073e547876b39a1c6f012cf30"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTuna_1_1Mesh.html#ab8d62e3bb8736133952e2ddbf48590c6">writeToFile</a> (string filename)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Write the coordinates of the mesh to a file.  <a href="#ab8d62e3bb8736133952e2ddbf48590c6"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a735885fadc04c198458ffc871eabd186"></a><!-- doxytag: member="Tuna::Mesh::Dim" ref="a735885fadc04c198458ffc871eabd186" args="" -->
int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTuna_1_1Mesh.html#a735885fadc04c198458ffc871eabd186">Dim</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Dimension of the mesh. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a737103720d5300f0de5765cda291a06d"></a><!-- doxytag: member="Tuna::Mesh::xyz" ref="a737103720d5300f0de5765cda291a06d" args="[3]" -->
vector&lt; <a class="el" href="classTuna_1_1Mesh.html#a79c0813866ecb690735d8d9b3bf8f89c">prec_t</a> &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTuna_1_1Mesh.html#a737103720d5300f0de5765cda291a06d">xyz</a> [3]</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Coordinate arrays. <br/></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<h3>template&lt;typename Tmesh&gt;<br/>
 class Tuna::Mesh&lt; Tmesh &gt;</h3>

<p>This class is the root of the hierarchy for mesh classes. This should be an "abstract" class from the point of view of the design. The functions <code><a class="el" href="classTuna_1_1Mesh.html#a47a5560e7bb6dcb2f13ffcc48f042072" title="Delegate responsabilities to derived classes.">calcPoints()</a></code> and <code><a class="el" href="classTuna_1_1Mesh.html#aefd043c52415901b9cf6bf5f231028fa" title="Delegate responsabilities to derived classes.">calcElements()</a></code> should be implemented in the derived classes.</p>
<dl class="author"><dt><b>Author:</b></dt><dd>Luis M. de la Cruz [ Sat Jan 19 18:16:37 GMT 2010 ] </dd></dl>

<p>Definition at line <a class="el" href="Mesh_8hpp_source.html#l00040">40</a> of file <a class="el" href="Mesh_8hpp_source.html">Mesh.hpp</a>.</p>
<hr/><h2>Member Typedef Documentation</h2>
<a class="anchor" id="a79c0813866ecb690735d8d9b3bf8f89c"></a><!-- doxytag: member="Tuna::Mesh::prec_t" ref="a79c0813866ecb690735d8d9b3bf8f89c" args="" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename Tmesh&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">typedef Typeinfo&lt;Tmesh&gt;::<a class="el" href="classTuna_1_1Mesh.html#a79c0813866ecb690735d8d9b3bf8f89c">prec_t</a> <a class="el" href="classTuna_1_1Mesh.html">Tuna::Mesh</a>&lt; Tmesh &gt;::<a class="el" href="classTuna_1_1Mesh.html#a79c0813866ecb690735d8d9b3bf8f89c">prec_t</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Reimplemented in <a class="el" href="classTuna_1_1StructuredMesh.html#a2466a6c86a4e811d7dff4fc63a9bb400">Tuna::StructuredMesh&lt; Tadaptor &gt;</a>, <a class="el" href="classTuna_1_1StructuredMesh.html#a2466a6c86a4e811d7dff4fc63a9bb400">Tuna::StructuredMesh&lt; Uniform&lt; Tprec, Dim &gt; &gt;</a>, and <a class="el" href="classTuna_1_1StructuredMesh.html#a2466a6c86a4e811d7dff4fc63a9bb400">Tuna::StructuredMesh&lt; NonUniform&lt; Tprec, Dim &gt; &gt;</a>.</p>

<p>Definition at line <a class="el" href="Mesh_8hpp_source.html#l00044">44</a> of file <a class="el" href="Mesh_8hpp_source.html">Mesh.hpp</a>.</p>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a102cde9073e547876b39a1c6f012cf30"></a><!-- doxytag: member="Tuna::Mesh::getCoord" ref="a102cde9073e547876b39a1c6f012cf30" args="(Axis_t a)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename Tmesh&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classTuna_1_1Mesh.html#af86367aa40f3dcc88dd3638c2e038751">ScalarField1D</a> <a class="el" href="classTuna_1_1Mesh.html">Tuna::Mesh</a>&lt; Tmesh &gt;::getCoord </td>
          <td>(</td>
          <td class="paramtype">Axis_t&nbsp;</td>
          <td class="paramname"> <em>a</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>a</em>&nbsp;</td><td>can be <code>X</code>, <code>Y</code> or <code>Z</code> </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="Mesh_8hpp_source.html#l00076">76</a> of file <a class="el" href="Mesh_8hpp_source.html">Mesh.hpp</a>.</p>

</div>
</div>
<a class="anchor" id="ab8d62e3bb8736133952e2ddbf48590c6"></a><!-- doxytag: member="Tuna::Mesh::writeToFile" ref="ab8d62e3bb8736133952e2ddbf48590c6" args="(string filename)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename Tmesh&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classTuna_1_1Mesh.html">Tuna::Mesh</a>&lt; Tmesh &gt;::writeToFile </td>
          <td>(</td>
          <td class="paramtype">string&nbsp;</td>
          <td class="paramname"> <em>filename</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>The file is in ASCII and 1, 2, or 3 columns are written depending on the dimension 1D, 2D or 3D respectively. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>filename</em>&nbsp;</td><td>is a string for the name of the output file. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="Mesh_8hpp_source.html#l00095">95</a> of file <a class="el" href="Mesh_8hpp_source.html">Mesh.hpp</a>.</p>

</div>
</div>
</div>
<!--- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&nbsp;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&nbsp;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&nbsp;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&nbsp;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&nbsp;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&nbsp;</span>Typedefs</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>



<hr size="1">
<div align="center">
Last modification: Sun Aug 28 09:57:21 CDT 2011
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&copy; 2011 LMCS-UNAM
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Generated by <a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="top" border="0" height="25"></a> 1.6.1 </div>

